/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.fee.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.fee.entity.DataCode;
import com.jeeplus.modules.fee.entity.DataValue;
import com.jeeplus.modules.fee.entity.FeeData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 数据源明细数值DAO接口
 * @author cyf
 * @version 2016-11-22
 */
@MyBatisMapper
public interface DataValueMapper extends BaseMapper<DataValue> {

	public List<FeeData> findListByfeeData(FeeData feeData);
	public List<DataCode> findListByfeeDataCode(DataCode feeDataCode);
	public List<DataValue> findValueByFeeDataId(String feeDataId);
	public List<DataValue> findValueByCodeId(@Param(value = "feeDataCodeId") String feeDataCodeId);
	public List<DataValue> findValueByCodeIdAndRowNo(@Param(value = "feeDataCodeId") String feeDataCodeId, @Param(value = "rowNo") Integer rowNo);
	//根据数据源id进行物理删除
	void deleteByData(@Param(value = "feeDataId") String feeDataId);
	//根据数据源id和表头id进行逻辑删除
	void deleteByDataAndCode(@Param(value = "feeDataId") String feeDataId, @Param(value = "codeId") String codeId);
	//根据表头查询最大的行号
	DataValue getMaxRowByData(@Param(value = "dataId") String dataId);
	//根据数据源id和行号删除数据源的一行明细值
	void deleteByDataAndRow(@Param(value = "dataId") String dataId, @Param(value = "rowNo") Integer rowNo);
	void updateByCodeAndRow(@Param(value = "codeId") String codeId, @Param(value = "rowNo") Integer rowNo, @Param(value = "value") String value);

}